<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2020/4/1
  Time: 11:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false"%>
<%
    pageContext.setAttribute("path", request.getContextPath());
%>
<html>
<head>
    <title>修改信息</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 引入 Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1 align="center">
                    基于SSM框架的管理系统：简单实现增、删、改、查。
                </h1>
            </div>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>修改员工</small>
                </h1>
            </div>
        </div>
    </div>

    <form action="" name="userForm">
        <input type="hidden" name="id" value="${worker.id}"/>
        姓名：<input type="text" name="name" value="${worker.name}"/><br><br><br>
        性别：<input type="text" name="sex" value="${worker.sex}"/><br><br><br>
        出生日期：<input type="text" name="birthday" value="${worker.birthday}"/><br><br><br>
        籍贯：<input type="text" name="birthplace" value="${worker.birthplace}"/><br><br><br>
        学历：<input type="text" name="education" value="${worker.education}"/><br><br><br>
        地址：<input type="text" name="address" value="${worker.address}"/><br><br><br>
        电话：<input type="text" name="tele" value="${worker.tele}"/><br><br><br>
        工龄：<input type="text" name="workage" value="${worker.workage}"/><br><br><br>
        基本工资：<input type="text" name="salary" value="${worker.salary}"/><br><br><br>
        <input type="button" value="提交" onclick="updateWorker()"/>
    </form>
    <script type="text/javascript">
        function updateWorker() {
            var form = document.forms[0];
            form.action = "${path}/worker/updateWorker";
            form.method = "post";
            form.submit();
        }
    </script>
</div>